Text objects in Python
The objects that work with text in Python 3.x are str, bytes, ByteArray.
Bytes and ByteArray can be used in addition to methods used for formatting (format, Format_map) and several special Unicode-based methods (Casefold,
This library primarily provides access toUCDa library of related content. UCDis aUnicodeCharacter Database (Unicode Character DataBase) is abbreviated. UCDby some descriptionUnicodePlain text for character attributes and internal relationships,
Python and coding
Text objects in Python
In Python 3. x, str, bytes, and bytearray are used to process text.
Bytes and bytearray can be used in addition to formatting (format, format_map) and several special Unicode-based methods (casefold,
Discover a good place to learn the CTF, the CTF training camp (http://ctf.idf.cn/) of the IDF laboratory.Just contact the CTF, to play under the kind, AK. Nice and cool.1. Morse codeTick ticking, it keeps turning.-- --- .-. ... .Ticking, ticking,
The code is as follows:
#!/usr/bin/env python## Copyright Facebook## Licensed under the Apache License, Version 2.0 (the "License"); May# not use this file except in compliance with the License. Obtain# A copy of the License at##
Copy codeThe Code is as follows:#! /Usr/bin/env python## Copyright 2009 Facebook## Licensed under the Apache License, Version 2.0 (the "License"); you may# Not use this file before t in compliance with the License. You may be obtain# A copy of the
1. codePointAt method is the simplest way to test whether a character consists of two bytes or four bytes.1 function Is32bit (c) {2 return c.codepointat (0) > 0xFFFF; 3 }45// true6// false2.ES6 provides methods for string instances to normalize()
(connected to the previous article)Standard ES6 Features6. The new string method/new string methods7. Symbol/symbols8. String Template/template StringsThe new string method/new string methodsCodepointat () and string.fromcodepoint ()JS interior is
Copy Code code as follows:
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# licensed under the Apache License, Version 2.0 (the "License"); May
# not use this file except in compliance with the License. For May obtain
# A copy of the
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.